// pages/components/ArticleList/ArticleList.js

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item:{
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    
  },

  /**
   * 组件的方法列表
   */
  methods: {
    toTop:function (e) {
    // body...
      console.log('*********')
      console.log(e)
      this.triggerEvent('toTop', e.target.dataset.code)
    },
    sale:function (e) {
    // body...
      console.log(e)
      this.triggerEvent('sale', e.target.dataset.code)
    },
    submoney:function (e) {
    // body...
      console.log(e)
      this.triggerEvent('submoney', e.target.dataset.code)
    },
    delete:function (e) {
      // body...
      console.log(e)
      this.triggerEvent('delete', e.target.dataset.code)
    },
    edit:function (e) {
      // body...
      console.log(e)
      this.triggerEvent('edit', e.target.dataset)
    },
    detailClick () {
      wx.navigateTo({
        url: '/pages/deviceDetail/deviceDetail',
      })
    },
     detailClick (e) {
      console.log(e.currentTarget.dataset)
      if (e.currentTarget.dataset.type==10) {
        return
      }
     var id=e.currentTarget.dataset.code;
      wx.navigateTo({
       url: '/pages/newDeviceDetail/newDeviceDetail?id='+id,
      })
    }
    
  }
})
